<!DOCTYPE html>
<html lang="zh">
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
	<title>系统管理员后台 - 家校互动系统</title>
	<link rel="shortcut icon" href="favicon.ico" />
	<link href="__TMPL__css/alice.css" rel="stylesheet" type="text/css" />
	<link href="__TMPL__css/style.css" rel="stylesheet" type="text/css" />
	<script src="__TMPL__js/jquery.min.js"></script>
	<script src="__TMPL__js/head.js"></script>
	<!--[if lt IE 9]>
	<script src="__TMPL__js/html5.js"></script>
	<![endif]-->
    
<link rel="stylesheet" href="__TMPL__/js/kindeditor/themes/default/default.css" />
<link rel="stylesheet" href="__TMPL__/js/kindeditor/plugins/code/prettify.css" />
<script charset="utf-8" src="__TMPL__/js/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="__TMPL__/js/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="__TMPL__/js/kindeditor/plugins/code/prettify.js"></script>
<script charset="utf-8" src="__TMPL__/js/kindeditor/kindeditor-min.js"></script>
    
    
<script>

KindEditor.ready(function(K) {
	var editor1 = K.editor({			
		uploadJson : '__APP__/Upload/index/f/student/'
	});
	
	var editor2 = K.editor({			
		uploadJson : '__APP__/Upload/index/f/parent/'
	});	
	
	
	K('#image3').click(function() {
			editor2.loadPlugin('image', function() {
				editor2.plugin.imageDialog({
					showRemote : false,
					imageUrl : K('#url3').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#img_url1').val(url);
						editor2.hideDialog();
					}
				});
			});
	});	

	K('#image2').click(function() {
			editor1.loadPlugin('image', function() {
				editor1.plugin.imageDialog({
					showRemote : false,
					imageUrl : K('#url3').val(),
					clickFn : function(url, title, width, height, border, align) {
						K('#img_url2').val(url);
						editor1.hideDialog();
					}
				});
			});
	});	
	

});


function addparent()
{
	str= '<table width="100%">	<tr class="ui-form-item"><td >家长资料：</td><td><span class="ui-td"></span></td></tr><tr class="ui-form-item"><td class="ui-label"><span class="ui-form-required">*</span>家长姓名：</td><td><span class="ui-td"><input name="copy_XM[]" type="text" class="ui-input" id="copy_XM[]" value="" ></span></td></tr><tr class="ui-form-item"><td class="ui-label">家长性别：</td><td><span class="ui-td"><label for="XBM4" class="checklabel"><input type="radio" class="ui-checkbox" name="copy_XBM[]" value="男">男</label><label for="XBM4" class="checklabel"><input type="radio" class="ui-checkbox" name="copy_XBM[]" value="女" >女</label></span></td></tr><tr class="ui-form-item"><td class="ui-label">家长出生年月：</td><td><span class="ui-td"><input name="copy_birthday[]" type="text" class="ui-input inputdate " id="copy_birthday[]" value="" ></span></td></tr><tr class="ui-form-item"><td class="ui-label"><span class="ui-form-required">*</span>家长手机：</td><td><span class="ui-td"><input name="copy_SJHM[]" type="text" class="ui-input" id="copy_SJHM[]">                          </span></td></tr><tr class="ui-form-item">                          <td class="ui-label">家长照片：</td>                          <td><span class="ui-td"><img src="__TMPL__img/avatar.gif" style="height:60px;display:block;margin:10px;" />                            <input type="file" name="copy_img[]" id="copy_img[]" class="ui-fileinput" >                           <br>                            提示： 建议使用60X60像素图片,jpg格式</span></td>                        </tr>                        <tr class="ui-form-item">                          <td class="ui-label">关系：</td>                          <td><span class="ui-td">                            <input name="copy_relation[]" type="text" class="ui-input" id="copy_relation[]">                          </span></td>                        </tr>                        <tr class="ui-form-item">                          <td class="ui-label">家长邮箱：</td>                          <td><span class="ui-td">                            <input name="copy_DZXX[]" type="text" class="ui-input" id="copy_DZXX[]">                          </span></td>                        </tr>                        <tr class="ui-form-item">                          <td class="ui-label">QQ号码：</td>                          <td><span class="ui-td">                            <input name="copy_QQ[]" type="text" class="ui-input" id="copy_QQ[]">                        <input type="" name="copy_parent_id[]" id="copy_parent_id[]" value="">  </span></td>                       </tr> </table>';
	$("#copyparent").append(str);
	iframe_height();
$('.inputdate').datetimepicker({timeFormat:''});
}
</script>    
    
    
</head> 
<body onload="iframe_height()">
<div id="bodyheight"><!-- 设定iframe框架 --> 
	<div style="width:100%">
	<a class="btn_back" href="__URL__/stu_man" style="width:20%">学生管理</a> <!-- 当前位置 返回按钮 -->
	</div>
	<!-- 内容框架开始 -->
	<div class="main padd6">
		<div class="tab_main clear">
			<a href="__URL__/stu_man" class="cur">学生管理</a>
			<a href="__URL__/stu_import">导入学生</a>
		</div>
	
		<div class="realmain padd22 clear">

			<!-- 列表内容开始 -->
			<div class="content">
				<form name="content_form" id="content_form" action="__URL__/stu_update" method="post" class="tableform" enctype="multipart/form-data">
                	<input  type="hidden" name="parentid" value="{$parentinfo.id}" />
                    <input  type="hidden" name="studentid" value="{$studentinfo.id}" />
                    
					<fieldset>
						<legend>添加学生</legend>
						
						<table width="100%" class="content_table">
						<tr class="ui-form-item ui-form-item-success"><!-- ui-form-item-success 错误时增加 -->
							<td  class="ui-label"><span class="ui-form-required">*</span>姓名：</td>
							<td class="ui-td">
							<input name="XM" type="text" class="ui-input" id="XM" value="{$studentinfo.XM}">
<!--							 <!--<p class="ui-form-explain ui-tiptext ui-tiptext-success">
								<i class="ui-tiptext-icon iconfont" title="成功">&#xF049;</i>
								正确时使用
							</p>-->
							</td>				
						</tr>
						<tr class="ui-form-item">
							<td  class="ui-label">拼音：</td>
							<td class="ui-td"><input name="XMPY" type="text" class="ui-input" id="XMPY" value="{$studentinfo.XMPY}"></td>				
						</tr>
						<tr class="ui-form-item">
							<td  class="ui-label">性别：</td>
							<td class="ui-td">
								<label for="XBM" class="checklabel"><input type="radio" class="ui-checkbox" name="XBM" value="男" <eq name='studentinfo.XBM' value='男'>checked</eq> >男</label>
							  <label for="XBM" class="checklabel"><input type="radio" class="ui-checkbox" name="XBM" value="女" <eq name='studentinfo.XBM' value='女'>checked</eq>>女</label>
							</td>			
						</tr>
						<tr class="ui-form-item">
							<td  class="ui-label">出生日期：</td>
							<td class="ui-td"><input name="birthday" type="text" class="ui-input inputdate" id="birthday" value="{$studentinfo.birthday}" /></td>				
						</tr>
						<tr class="ui-form-item">
							<td  class="ui-label"><span class="ui-form-required">*</span>所在班级：</td>
							<td class="ui-td">{~classlist($studentinfo[class_id])}
							</td>				
						</tr>
						<tr class="ui-form-item">
							<td  class="ui-label"><span class="ui-form-required">*</span>学号：</td>
							<td class="ui-td"><input name="XH" type="text" class="ui-input" id="XH" value="{$studentinfo.XH}"></td>				
						</tr>
						<tr class="ui-form-item">
							<td  class="ui-label">学生照片：</td>
							<td class="ui-td">
                            <eq name="studentinfo.pic" value="">
								<img src="__TMPL__img/avatar.gif" style="height:60px;display:block;margin:10px;" />
                            <else/>
                            	<img src="/{$studentinfo.pic}" style="height:60px;display:block;margin:10px;" />
                            </eq>
							<!--<input type="file" name="pic" class="ui-fileinput">-->
                            <input class="ui-input" type="text" id="img_url2" name="student_pic" value="" style="width:125px;" /> 
                                                <input type="button" id="image2" value="上传"  style=" border:#999 solid 1px; width:60px; height:30px;"/>
                            <br>
							提示： 建议使用60X60像素图片,jpg格式</td>				
						</tr>
                        
                        <tr class="ui-form-item">
                          <td  class="ui-label">家长列表：</td>
                          <td class="ui-td"><span onClick="addparent()" >添加家长</span></td>
                        </tr>
                        <tr><td colspan="2" id="copyparent">
                        
                        
                        <volist name="parentlist" id="vo">
                        <table width="100%">	<tr class="ui-form-item"><td >家长资料：</td><td><span class="ui-td"></span></td></tr><tr class="ui-form-item"><td class="ui-label"><span class="ui-form-required">*</span>家长姓名：</td><td><span class="ui-td"><input name="copy_XM[]" type="text" class="ui-input" id="copy_XM[]" value="{$vo.XM}" ></span></td></tr><tr class="ui-form-item"><td class="ui-label">家长性别：</td><td><span class="ui-td"><label for="XBM4" class="checklabel"><input type="radio" class="ui-checkbox" name="copy_XBM[]" value="男" <eq name='vo.XBM' value='男'>checked</eq>>男</label><label for="XBM4" class="checklabel"><input type="radio" class="ui-checkbox" name="copy_XBM[]" <eq name='vo.XBM' value='女'>checked</eq> value="女" >女</label></span></td></tr><tr class="ui-form-item"><td class="ui-label">家长出生年月：</td><td><span class="ui-td"><input name="copy_birthday[]" type="text" class="ui-input inputdate " id="copy_birthday[]" value="{$vo.birthday}" ></span></td></tr><tr class="ui-form-item"><td class="ui-label"><span class="ui-form-required">*</span>家长手机：</td><td><span class="ui-td"><input name="copy_SJHM[]" type="text" class="ui-input" id="copy_SJHM[]" value="{$vo.user_id|getusersjhm}">                          </span></td></tr><tr class="ui-form-item">                          <td class="ui-label">家长照片：</td>                          <td><span class="ui-td">
                        
                        <eq name="vo.pic" value="">
								<img src="__TMPL__img/avatar.gif" style="height:60px;display:block;margin:10px;" />
                            <else/>
                            	<img src="/{$vo.pic}" style="height:60px;display:block;margin:10px;" />
                            </eq>
							
                          <label for="fileField"></label>
                          <input type="file" name="copy_img[]" id="copy_img[]" class="ui-fileinput" >
                          <br>                            提示： 建议使用60X60像素图片,jpg格式</span></td>                        </tr>                        <tr class="ui-form-item">                          <td class="ui-label">关系：</td>                          <td><span class="ui-td">                            <input name="copy_relation[]" type="text" class="ui-input" id="copy_relation[]">                          </span></td>                        </tr>                        <tr class="ui-form-item">                          <td class="ui-label">家长邮箱：</td>                          <td><span class="ui-td">                            <input name="copy_DZXX[]" type="text" class="ui-input" id="copy_DZXX[]" value="{$vo.DZXX}">                          </span></td>                        </tr>                        <tr class="ui-form-item">                          <td class="ui-label">QQ号码：</td>                          <td><span class="ui-td">                            <input name="copy_QQ[]" type="text" class="ui-input" id="copy_QQ[]" value="{$vo.DZXX}">                          
                          <input  name="copy_parent_id[]" id="copy_parent_id[]" type="hidden" value="{$vo.id}">
                        </span></td>                       </tr> </table>
                        
                        
                        </volist>
                        
                        
                        
                        
                        </td></tr>
                        
                        
                        
                        
						</table>

						<div class="submitdiv">
							<input type="submit" class="ui-button ui-button-mgreen" value="提交">
							<input type="button" class="ui-button ui-button-mwhite" value="返回" onclick="history.go(-1)">
					  </div>
					</fieldset>
				</form>
		
			</div>
			<!-- 列表内容结束 -->
			
		</div>
	</div>
	<!-- 内容框架结束 -->
</div>

<iframe width='0' id='top_src' height='0' src=''></iframe>
<include file="Public:foot" />
</body>
</html>